<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        //运算符的优先级
        //'()' > '++ -- !' > '*/+-' > '> >= < <=' > '== != === !==' > '先&& ||' > '='
        console.log(4 >= 6 || '人' != '阿凡达' && !(12 * 2 == 144) || true);
        var num = 10;
        console.log(5 == num / 2 && (2 + 2 * num.toString() === 22));
        // by sjs
        // 运算符的优先级不要去记，也不要写出优先级难以阅读的代码，通过小括号来保证优先级。
        console.log('通过括号保证优先级', (8 > 6) && ( 111 || 222 ));
    </script>
</head>

<body>

</body>

</html>